#include "contractor-section-view.h"
#include "debug-helper.h"
#include "order-item-section-view.h"
#include "order-section-view.h"
#include "product-in-warehouse-section-view.h"
#include "product-section-view.h"
#include "section-view-factory.h"
#include "server-section-view.h"
#include "warehouse-section-view.h"
#include "worker-section-view.h"

AbstractSectionView* SectionViewFactory::sectionView (SmGlobal::SectionType sectionType)
{
    switch (sectionType)
    {
    case SmGlobal::ContractorSection:
        return new ContractorSectionView();
    case SmGlobal::OrderItemSection:
       return new OrderItemSectionView();
    case SmGlobal::OrderSection:
        return new OrderSectionView();
    case SmGlobal::ProductInWarehouseSection:
        return new ProductInWarehouseSectionView();
    case SmGlobal::ProductSection:
        return new ProductSectionView();
    case SmGlobal::ServerSection:
        return new ServerSectionView();
    case SmGlobal::WarehouseSection:
        return new WarehouseSectionView();
    case SmGlobal::WorkerSection:
        return new WorkerSectionView();
    default:
        fatalError(sectionType);
        return 0;
    }
}
